<script setup lang="ts">
	import { ref, onMounted } from "vue";
	import { formRules } from "./utils/rule";
	import { FormProps } from "./utils/types";
	import ReCol from "@/components/ReCol";
  import { baseUrlApi, baseOaApi } from "@/api/utils";
  import type { UploadProps } from "element-plus";
  import { message } from "@/utils/message";
	const props = withDefaults(defineProps<FormProps>(), {
		formInline: () => ({
			title: "",
			status: 0,
			Id: 0,
		})
	});
	const ruleFormRef = ref();
	const newFormInline = ref(props.formInline);
	function getRef() {
		return ruleFormRef.value;
	}
	defineExpose({ getRef });

  onMounted(()=> {

  })

</script>

<template>
	<el-form ref="ruleFormRef" :model="newFormInline" :rules="formRules" label-width="auto">
    <el-row :gutter="30">
      <!-- <re-col :value="24" :xs="24" :sm="24">
      	<el-form-item label="是否增值税发票" prop="isVat">
          <el-radio-group v-model="newFormInline.isVat">
            <el-radio :label="1">是</el-radio>
            <el-radio :label="0">否</el-radio>
          </el-radio-group>
      	</el-form-item>
      </re-col> -->
      <re-col :value="24" :xs="24" :sm="24">
      	<el-form-item label="发票抬头名称" prop="title">
          <el-input v-model="newFormInline.title" clearable placeholder="请输入发票抬头名称" />
      	</el-form-item>
      </re-col>
      <!-- <re-col :value="24" :xs="24" :sm="24">
      	<el-form-item label="发票抬头内容" prop="content">
          <el-input v-model="newFormInline.content" type="textarea" :rows="3" clearable placeholder="请输入发票抬头内容" />
      	</el-form-item>
      </re-col> -->
      <re-col :value="24" :xs="24" :sm="24">
      	<el-form-item label="发票金额" prop="amount">
          <el-input-number
          	v-model="newFormInline.amount"
          	class="!w-full"
          	:min="0"
          	controls-position="right"
            :precision="2"
            :step="100"
            :controls="false"
            style="text-align: left;"
          />
      	</el-form-item>
      </re-col>
      <!-- <re-col :value="24" :xs="24" :sm="24">
      	<el-form-item label="发票税号" prop="taxNo">
          <el-input v-model="newFormInline.taxNo" clearable placeholder="请输入发票税号" />
      	</el-form-item>
      </re-col> -->
      <!-- <re-col :value="24" :xs="24" :sm="24">
      	<el-form-item label="开票税金" prop="tax">
          <el-input-number
          	v-model="newFormInline.tax"
          	class="!w-full"
          	:min="0"
          	controls-position="right"
            :precision="2"
            :step="5"
          />
      	</el-form-item>
      </re-col> -->
     <!-- <template v-if="newFormInline.isVat === 1">
        <re-col :value="24" :xs="24" :sm="24">
        	<el-form-item label="公司名称" prop="companyName">
            <el-input v-model="newFormInline.companyName" clearable placeholder="请输入公司名称" />
        	</el-form-item>
        </re-col>
        <re-col :value="24" :xs="24" :sm="24">
        	<el-form-item label="公司地址" prop="companyAddress">
            <el-input v-model="newFormInline.companyAddress" clearable placeholder="请输入公司地址" />
        	</el-form-item>
        </re-col>
        <re-col :value="24" :xs="24" :sm="24">
        	<el-form-item label="联系电话" prop="telephone">
            <el-input v-model="newFormInline.telephone" clearable type="number" class="no_number" placeholder="请输入联系电话"
            oninput="if(value.length>11)value=value.slice(0,11)"/>
        	</el-form-item>
        </re-col>
        <re-col :value="24" :xs="24" :sm="24">
        	<el-form-item label="开户银行" prop="bankName">
            <el-input v-model="newFormInline.bankName" clearable placeholder="请输入开户银行" />
        	</el-form-item>
        </re-col>
        <re-col :value="24" :xs="24" :sm="24">
        	<el-form-item label="银行帐号" prop="bankAccount">
            <el-input v-model="newFormInline.bankAccount" clearable type="number" class="no_number" placeholder="请输入银行帐号" />
        	</el-form-item>
        </re-col>
      </template> -->

    </el-row>
	</el-form>
</template>
<style scoped>

  :deep(.el-input-number.is-without-controls .el-input__wrapper) {
    padding: 1px 11px;
  }
  :deep(.el-input-number .el-input__inner) {
    text-align: left;
  }
</style>
